<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ page import="org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter"%>
<%@ page import="org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter"%>
<%@ page import="org.springframework.security.web.WebAttributes"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Jerry</title>
		<%@ include file="/common/meta.jsp"%>
		<link rel="stylesheet" type="text/css" href="${ctx}/resource/css/login.css" />
		<script language="JavaScript">
			if (window != top)
				top.location.href = location.href;
</script>
	</head>
	<body id="login">
		<div id="login-wrapper" class="png_bg">
			<div id="login-content">
				<%
					if (session.getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION) != null) {
				%>
				<div class="error">
					登录失败，请重试.
				</div>
				<%
					}
				%>

				<form action="${ctx}/j_spring_security_check" method="post">
					<div align="center">

						<label>
							用户名:
						</label>
						<input type='text' id='j_username' name='j_username' class="text-input"
							<s:if test="not empty param.error"> value='<%=session
							.getAttribute(UsernamePasswordAuthenticationFilter.SPRING_SECURITY_LAST_USERNAME_KEY)%>'</s:if> />
						<div class="clear"></div>
						<label>
							密码:
						</label>
						<input type='password' id='j_password' name='j_password' class="text-input" />
						<div class="clear"></div>

						<p>
							<input class="button" type="submit" value="登录" />
						</p>

					</div>
				</form>
			</div>
		</div>
	</body>
</html>

